#include "statusedit.h"
#include <QtGui>

StatusEdit::StatusEdit(QWidget *parent) :
        QTextEdit(parent)
{
}

void StatusEdit::keyPressEvent(QKeyEvent *event)
{
    if(event->key() == Qt::Key_Return)
    {
        QString newStatus = toPlainText().simplified();
        if(!newStatus.isEmpty())
        {
            emit keyPressed();
            return;
        }
    }
    QTextEdit::keyPressEvent(event);
}
